package com.yitiao.jvm;

public class MyClassLoader extends ClassLoader{
    private String name;
    public MyClassLoader(String name) {
        this.name= name;
    }

    @Override
    protected Class<?> findClass(String name) throws ClassNotFoundException {
        return super.findClass(name);
    }

    public static void main(String[] args) throws ClassNotFoundException {
        String str="Class Loader";
        System.out.println(str.getClass().getClassLoader());

        Class<?> driver = Class.forName("java.sql.Driver");
        System.out.println(driver.getClassLoader());

//        MyClassLoader loader = new MyClassLoader();
//        System.out.println(loader.getClass().getClassLoader().getParent());

    }

}
